package com.hy.mydesktop.client.component.meta;

import java.util.List;
import java.util.Map;

import com.extjs.gxt.ui.client.data.BaseModel;
import com.extjs.gxt.ui.client.data.ModelData;
import com.hy.mydesktop.shared.persistence.domain.gxt.constant.ComponentMetaDataConstants;

/**
 * <ul>
 * <li>开发作者：花宏宇</li>
 * <li>设计日期：2010-10-9；时间：上午11:45:26</li>
 * <li>类型名称：GridPagingLoadConfigModel</li>
 * <li>设计目的：用于Rpc调用中，对于分页Grid的PagingLoadConfig对象，进行ModelData的封装</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */
public class GridPagingLoadConfigModel extends BaseModel {

	

	/**
	 * <ul>
	 * <li>开发作者：花宏宇</li>
	 * <li>设计日期：2010-10-20；时间：下午01:59:00</li>
	 * <li>字段类型：long；字段名称：serialVersionUID</li>
	 * <li>设计目的：</li>
	 * </ul>
	 * <ul>
	 * <b>修订编号：</b>
	 * <li>修订日期：</li>
	 * <li>修订作者：</li>
	 * <li>修订原因：</li>
	 * <li>修订内容：</li>
	 * </ul>
	 */
	private static final long serialVersionUID = -2336680669541873597L;

	public GridPagingLoadConfigModel() {
		super();
	}

	public GridPagingLoadConfigModel(int offset, int limit) {
		super();
		
		this.setOffset(offset);
		this.setLimit(limit);
	}

	public GridPagingLoadConfigModel(Map<String, Object> properties) {
		super(properties);
	}

	

	public int getOffset() {
		return super.get(ComponentMetaDataConstants.OFFSET);
	}

	public int getLimit(){
		return super.get(ComponentMetaDataConstants.LIMIT);
	}

	public void setOffset(int offset) {
//		super.set("offset", offset);
		super.set(ComponentMetaDataConstants.OFFSET, offset);
	}

	public void  setLimit(int limit){
		super.set(ComponentMetaDataConstants.LIMIT, limit);
//		super.set("limit", limit);
	}

}
